package com.wushi.lenovo.asia5b.app_widget.status;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;

import com.mvp.utils.DisplayUtils;

/**
 * Created by zhangyuncai on 2018/10/20.
 * 高度==状态栏高度的view
 */
public class StatusHeightView extends View {
    public StatusHeightView(Context context) {
        super(context);
    }

    public StatusHeightView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public StatusHeightView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
        setMeasuredDimension(getMeasuredWidth(),DisplayUtils.getStatusHeight(getContext()));
    }
}
